package nl.numblock.flowcharter.view {	import nl.numblock.flowcharter.events.UMLEvent;
	import nl.numblock.flowcharter.constants.Notifications;	import nl.numblock.flowcharter.view.components.UMLContainer;	import org.puremvc.as3.multicore.interfaces.INotification;	import org.puremvc.as3.multicore.patterns.mediator.Mediator;	import flash.display.DisplayObject;	/**	 * Short description for file.	 *	 * @package    nl.numblock.flowcharter.view	 * @author     numblock / 2010	 * @version    SVN: $Id$	*/	public class UMLContainerMediator extends Mediator	{		public static const NAME 	: 	String 	= 	"UMLContainerMediator";		public function UMLContainerMediator(viewComponent : Object = null)		{			super(NAME, viewComponent);		}				override public function onRegister() : void		{			umlContainer.addEventListener(UMLEvent.TWEEN_ENDED, onTweenEnd);		}		private function onTweenEnd(event : UMLEvent) : void 		{
			updateScrollPane();
		}		override public function listNotificationInterests() : Array		{			return	[						Notifications.ADD_NOTIFICATION,						Notifications.ADD_COMMAND,						Notifications.ADD_COMMAND_SINGLE,						Notifications.ADD_MEDIATOR,						Notifications.ADD_MEDIATOR_SINGLE					];		}				override public function handleNotification(note : INotification) : void		{			var uml	:	DisplayObject	=	note.getBody() as DisplayObject;			switch( note.getName() )			{				case Notifications.ADD_NOTIFICATION 	:					umlContainer.addNotification(uml);				break;				case Notifications.ADD_COMMAND		 	:				case Notifications.ADD_MEDIATOR		 	:					umlContainer.addNoteListener(uml);				break;			}		}				private function updateScrollPane() : void		{			sendNotification(Notifications.UPDATE_SCROLL_PANE);		}		public function get umlContainer() : UMLContainer		{			return viewComponent as UMLContainer;		}	}}